export default {
  Investor: {
    form: {
      fields: [
        {
          property: 'user',
          field_options: { label: '会员手机号码' },
        },
        {
          property: 'region',
          field_options: { label: '投资区域' },
          relation_filter: {
            '@filter': 'entity.getLevelType() == 0'
          }
        },
        {
          property: 'totalStore',
          field_options: { label: '投资门店数' }
        },
        {
          property: 'stores',
          field_options: { label: '投资门店' }
        }
      ]
    },
    list: {
      list_display: [
        'id',
        {
          property: 'comment',
          label: '投资人姓名'
        },
        {
          property: 'user',
          label: '会员手机号码'
        },
        {
          property: 'region',
          label: '投资类型',
          component: {
            props: ['data'],
            render(h) {
              if (this.data == null) {
                return (
                  <div>仓库投资人</div>
                )
              } else {
                return (
                  <div>门店投资人</div>
                )
              }
            }
          }
        },
        {
          property: 'region',
          label: '投资区域'
        },
        {
          property: 'extraData.totalStores',
          label: '投资门店份'
        },
        {
          property: 'extraData.startTime',
          label: '分红开始日期',
          type: 'date'
        },
        {
          property: 'stores',
          label: '投资仓库'
        }
      ]
    }
  }
}
